cc.Class({
	extends: cc.Component,

	properties: {},

	// onLoad () {},

	start() {
		this.node.getChildByName("deskNum").getComponent(cc.Label).string =
			this.roomID;
	},

	init(roomID) {
		this.roomID = roomID;
	},
	// 点击了座位，进入房间
	onDeskClicked(event, customData) {
		let data = {};
		data.roomID = this.roomID;
		data.seatID = Number(customData);
		cc.vv.CMM.request_enterRoom(data, (err, info) => {
			if (err) {
				cc.log(err);
			} else {
				cc.vv.RoomID = this.roomID;
				cc.vv.playerNum++;
				cc.director.loadScene("gameFive");
			}
		});
	},

	// update (dt) {},
});
